package com.mba.activity;

import java.util.ArrayList;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;


import com.mba.adapter.ContentActivityAdapter;
import com.mba.adapter.HomeListAdapter;
import com.mba.adapter.MsgActivitiyAdapter;
import com.mba.base.BaseActivity;
import com.mba.bean.ContentInfo;
import com.mba.bean.pojo;

public class MsgRecivePageActivity extends BaseActivity{
	 public ArrayList<ContentInfo> contentList;
	    private Spinner replyChoice;
	    private ListView showReplyListView;
	    @Override
		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
	        setContentView(R.layout.msg_recive_page_activity);
	        init();
	        /*
	        replyChoice = (Spinner) findViewById(R.id.msg_lv);
	        replyChoice.setAdapter(new ContentActivityAdapter(this));
	   
	        replyChoice.setOnItemSelectedListener(new OnItemSelectedListener() {

				@Override
				public void onItemSelected(AdapterView<?> arg0, View arg1,
						int position, long arg3) {
					if(position == 1 ){
						if(showReplyListView.isShown()){
							showReplyListView.setVisibility(View.GONE);
						}
					}else{
						showReplyListView.setVisibility(View.VISIBLE);
					}
					
				}
				
				@Override
				public void onNothingSelected(AdapterView<?> arg0) {
					
				}
			});
			*/
	        Button btn = (Button) findViewById(R.id.test_btn);
	        btn.setOnClickListener(new Button.OnClickListener() {
				@Override
				public void onClick(View v) {
					Intent intent = new Intent (MsgRecivePageActivity.this,MainTopRightDialog.class);			
					startActivity(intent);	
				}
			});
	        showReplyListView = (ListView) findViewById(R.id.msg_showing_reply_lv);
	        this.contentList =pojo.testMsg();
	        showReplyListView.setAdapter(new MsgActivitiyAdapter(this, contentList));
	        
	        
	        
			
		}
	    
	    /**
	     * 加载消息数据
	     */
	    public void init() {
	    	
	    }
	    
	    
	    
	    
}
